package pers.mihao.quickstream.common.task.dto;

import lombok.*;
import pers.mihao.quickstream.common.model.Features;
import pers.mihao.quickstream.common.task.constans.TaskStatus;
import pers.mihao.quickstream.common.task.constans.TaskType;

import java.util.Date;

/**
 * @author mihao
 * @since 2024/11/15
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ToString
public class AutomaticTaskDTO {

    private Long id;

    private Date gmtCreate;

    private Date gmtModify;
    /**
     * 业务唯一键
     */
    private String bizId;

    private String bizType;

    private String name;

    private String description;
    /**
     * @see pers.mihao.quickstream.common.task.constans.TaskType
     */
    private TaskType taskType;

    private String taskConfig;

    /**
     * @see TaskStatus
     */
    private TaskStatus status;

    private String schedulerTimeType;

    private String schedulerTimeValue;

    /**
     * 下一次执行时间
     */
    private Date nextInvokeTime;

    /**
     * 最近一次执行时间
     */
    private Date lastInvokeTime;
    /**
     * 创建该任务的用户
     */
    private String createBy;
    /**
     * 修改用户
     */
    private String modifiedBy;

    /**
     * 优先级
     */
    private Integer priority;

    /**
     * '任务失败后的重试次数'
     */
    private Integer retryCount;
    /**
     * 任务的最大执行时间限制（秒）
     */
    private Integer timeLimit;

    private Integer version;

    private Features features;

}
